﻿<?php

if(!defined('IN_PHPSCUP'))exit('hacking'); 
class JobApp extends BaseApp
{
    function index()
    {
		
		$TB_job = &$this->_model('job'); 
				
		$data = $TB_job->show();	
	    
		
        $this->assign('lw_data', $data['data']);		
		$this->assign('lw_page', $data['page']); 				
					
	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');		
		
        $this->display('job_list.view.html');
    }


    function add()
    {
		
	
	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');		
		
        $this->display('job_add.view.html');
    }
	

    function addpost()
    {

	     $data = $_POST['data'];
         
		 $data['user_id'] = $GLOBALS['SCup']->SCup_user_msg['user_id'];

		 $TB_job = &$this->_model('job');
		 		 		
		 $TB_job->post($data);
		 		 
		 $this->index();

    }

    function edit()
    {
		$id= intval($_GET['id']);
		
		$TB_job = &$this->_model('job'); 
				
		$data = $TB_job->oneshow($id);		

        $this->assign('data', $data);

        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');		
		
        $this->display('job_edit.view.html');
      

    }

    function editpost()
    {
		$id= intval($_POST['id']);
		
		$data = $_POST['data'];
   
		$TB_job = &$this->_model('job'); 		
				
		$TB_job->editaction($id,$data);
			
		$this->index();  	      

    }
	
	

    function del()
    {
		$id= intval($_GET['id']);		

		$TB_job = &$this->_model('job'); 		
		$TB_job->del($id);
				      
        $this->index();    
    }	
    function jobhuidel()
    {
		$id= intval($_GET['id']);		

		$TB_job = &$this->_model('job'); 		
		$TB_job->jobhuidel($id);
				      
        $this->jobhui();    
    }
	function jobhui(){
		$TB_job = &$this->_model('job'); 
				
		$data = $TB_job->getAllHrSubmit();	    
		
        $this->assign('lw_data', $data['data']);		
		$this->assign('lw_page', $data['page']); 		
					
	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');		
		
        $this->display('job_hrsubmits.view.html');
	}

   function jobhuiview(){

    	$id= intval($_GET['id']);

		
		$TB_job = &$this->_model('job'); 
		
		$data = $TB_job->getHrSubmitById($id);	
		
		$data['chengyuan_peiou'] = explode(',',$data['chengyuan_peiou']);
		
		$xueliArr = explode('|',$data['xueli']);
		$xueli = array();
		foreach($xueliArr as $v){
			$xueli[] = explode(',',$v);
		}
		
		$data['xueli'] = $xueli;
		
		$gongzuojingliArr = explode('|',$data['gongzuojingli']);
		$gongzuojingli = array();
		foreach($gongzuojingliArr as $v){
			$gongzuojingli[] = explode(',',$v);
		}
		$data['gongzuojingli'] = $gongzuojingli;
		
		$chengyuan_znArr = explode('|',$data['chengyuan_zn']);
		$chengyuan_zn = array();
		foreach($chengyuan_znArr as $v){
			$chengyuan_zn[] = explode(',',$v);
		}
		$data['chengyuan_zn'] = $chengyuan_zn;
		
		$chengyuan_fmArr = explode('|',$data['chengyuan_fm']);
		$chengyuan_fm = array();
		foreach($chengyuan_fmArr as $v){
			$chengyuan_fm[] = explode(',',$v);
		}
		$data['chengyuan_fm'] = $chengyuan_fm;
		
		$chengyuan_pfmArr = explode('|',$data['chengyuan_pfm']);
		$chengyuan_pfm = array();
		foreach($chengyuan_pfmArr as $v){
			$chengyuan_pfm[] = explode(',',$v);
		}
		$data['chengyuan_pfm'] = $chengyuan_pfm;
		
		$chengyuan_xdjmArr = explode('|',$data['chengyuan_xdjm']);
		$chengyuan_xdjm = array();
		foreach($chengyuan_xdjmArr as $v){
			$chengyuan_xdjm[] = explode(',',$v);
		}
		$data['chengyuan_xdjm'] = $chengyuan_xdjm;
		
		$chengyuan_qqArr = explode('|',$data['chengyuan_qq']);
		$chengyuan_qq = array();
		foreach($chengyuan_qqArr as $v){
			$chengyuan_qq[] = explode(',',$v);
		}
		$data['chengyuan_qq'] = $chengyuan_qq;
		
		$qinyou_infoArr = explode('|',$data['qinyou_info']);
		$qinyou_info = array();
		foreach($qinyou_infoArr as $v){
			$qinyou_info[] = explode(',',$v);
		}
		$data['qinyou_info'] = $qinyou_info;
		
		$pengyou_infoArr = explode('|',$data['pengyou_info']);
		$pengyou_info = array();
		foreach($pengyou_infoArr as $v){
			$pengyou_info[] = explode(',',$v);
		}
		$data['pengyou_info'] = $pengyou_info;
		
		$qidaoArr = explode('|',$data['qidao']);
		$qidao = array();
		foreach($qidaoArr as $v){
			$qidao[] = explode(',',$v);
		}
		$data['qidao'] = $qidao;
		
		$this->assign('data',$data);	

        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');	    	
    	$this->display('job_view.view.html');
    } 
 
	
   
}





?>